{
 "cells": [
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "This IPython Notebook contains a simple example of the scatter function, and also showcases the ability for Bokeh to show two plots in the same Jupyter Notebook cell.\n",
    "\n",
    "To clear all previously rendered cell outputs, select from the menu:\n",
    "\n",
    "    Cell -> All Output -> Clear"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from six.moves import zip\n",
    "\n",
    "from bokeh.plotting import figure, show, output_notebook\n",
    "\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "N = 4000\n",
    "\n",
    "x = np.random.random(size=N) * 100\n",
    "y = np.random.random(size=N) * 100\n",
    "radii = np.random.random(size=N) * 1.5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "TOOLS=\"hover,crosshair,pan,wheel_zoom,box_zoom,reset,tap,save,box_select,poly_select,lasso_select\"\n",
    "\n",
    "colors2 = [\"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)]\n",
    "p1 = figure(width=300, height=300, tools=TOOLS)\n",
    "p1.scatter(x,y, radius=radii, fill_color=colors2, fill_alpha=0.6, line_color=None)\n",
    "\n",
    "colors2 = [\"#%02x%02x%02x\" % (150, int(g), int(b)) for g, b in zip(50+2*x, 30+2*y)]\n",
    "p2 = figure(width=300, height=300, tools=TOOLS)\n",
    "p2.scatter(x,y, radius=radii, fill_color=colors2, fill_alpha=0.6, line_color=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "show(p1)\n",
    "show(p2)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
